# #求1-100的总数和
# sum = 0
# for i in range(1, 101):
#     sum += i
# print(sum)
#
# #求1-1000的总数和
# sum = 0
# for i in range(1, 1001):
#     sum += i
# print(sum)
#
# #求300-400的总数和
# sum = 0
# for i in range(300, 401):
#     sum += i
# print(sum)


# #定义函数
# def calcSum(begin, end):
#     sum = 0
#     for i in range(begin, end + 1):
#         sum += i
#     return sum
#
#  #调用函数
# result = calcSum(1, 100)
# print(result)

# def isOld(sum):
#     if sum % 2 == 0:
#         return True
#     else:
#         return False
#
# result = isOld(7)
# print(result)
# result = isOld(10)
# print(result)

# def getpoint():
#     x = 3
#     y = 6
#     return x, y
# getpoint()
# print(x, y)

# def fac(n):
#     if n == 1:
#         return 1
#     return n * fac(n-1)
#
# result = fac(5)
# print(result)

# def fun1():
#     print("函数 1")
#
# def fun2():
#     print("函数 2")
#     fun1()
#
# def fun3():
#     print("函数 3")
#     fun2()
#
# def fun4():
#     print("函数 4")
#     fun3()
# fun4()

# x = 6#全局（外部）
# def test():
#     global x
#     x = 10#局部（内部）
#     print(f'x = {x}')
# test()
# print(f'x = {x}')

# def Add(x, y, debug = False):
#     if debug:
#         print(f'x = {x},y = {y}')
#     return x + y
# print(Add(3, 6))
# print(Add(5, 9, True))

def Test(x, y):
    print(f'x = {x}')
    print(f'x = {y}')
Test(x = 3, y = 7)
Test(y = 7, x = 3)
